﻿@inherits AppComponentBase

@if (isNavOpen)
{
    <div class="nav-menu-shadow nav-menu--mobile" @onclick="@WrapHandled(ToggleMenu)"></div>
}
<div class="nav-menu @(isNavOpen is false ? "nav-menu--desktop" : null)">
    <div class="search-box-container">
        <BitSearchBox Underlined
                      Value="@searchText"
                      Placeholder="Search"
                      OnClear="HandleOnClear"
                      Immediate DebounceTime="300"
                      ValueChanged="HandleValueChanged" />
        @if (filteredNavItems.Count == 0)
        {
            <br />
            <div>nothing found!</div>
        }
    </div>
    <div class="nav-menu-list">
        <BitNav Items="filteredNavItems"
                Class="@GetNavMenuClass()"
                OnItemClick="WrapHandled<BitNavItem>(HandleOnItemClick)" />
        <div style="height:50px"></div>
    </div>
</div>